 <{extends file="<{$tempdir}>/public/admin.html"}>
   <{block name=extendjs}>
<script type="text/javascript" language="javascript" src="<{$siteurl}>/templates/<{$tempdir}>/public/js/artdialog/plugins/iframeTools.js"></script>
 <{/block}>
 <{block name=controlname}>保存广告<{/block}>
 <{block name=bodylist}>
  <{load_data assign="info" table="adv" type="one"  fileds="*"  where="id=<{$id}>"  }>
    <{$advtypelist = array()}>
    <{if !empty($advtype)}>
	 	     <{$advtypelist = $advtype|unserialize}>
	  <{/if}>
	  <div class="managShopCon">
	<div class="managShopBox">
		<div class="managShopMain">
			<{include file="<{$tempdir}>/public/commentcate.html"}>  
			<div class="addShopSingCon">
			
	  
	  
    <div style="width:100%; ">

          <div class="tags">

          <div id="tagscontent">
            <form method="post" name="form1" action="<{ofunc type=url link="/areaadminpage/adv/module/saveadv/datatype/json"}>" onsubmit="return subform('<{ofunc type=url link="/areaadminpage/adv/module/advlist"}>',this);">
              <div>
                <table border="0" cellspacing="2" cellpadding="4" class="list" name="table" id="table" width="100%">
                  <tbody>

                  	<tr onmouseover="this.bgColor='#F5F5F5';" onmouseout="this.bgColor='ffffff';" bgcolor="ffffff">
                      <td class="left">广告名称</td>
                      <td><input type="text" name="title" id="title" value="<{$info['title']}>" class="skey" style="width:150px;" ></td>
                    </tr>
                    <tr onmouseover="this.bgColor='#F5F5F5';" onmouseout="this.bgColor='ffffff';" bgcolor="ffffff">
                      <td class="left">广告类型</td>
                      <td>
                      	 <select name="advtype">
                      	 	 <{foreach from=$advtypelist key=myid item=items}>
                      	   <option value="<{$items['typename']}>" <{if $info['advtype'] == $items['typename']}>selected<{/if}>>  <{$items['typeurl']}></option>
                      	   <{/foreach}>
                      		</select>
                       </td>
                    </tr>
                      <tr onmouseover="this.bgColor='#F5F5F5';" onmouseout="this.bgColor='ffffff';" bgcolor="ffffff">
                      <td class="left" valign="top">广告图片</td>
                      <td>
                      	<img src="<{$info['img']}>" width=80px height=80px id="imgshow" <{if  empty($info['img'])}> style="display:none;"<{/if}>>
                      	<input type="hidden" name="img" id="img" value="<{$info['img']}>" class="skey" style="width:150px;" >
                      	<span onclick="uploads();">上传图片</span>
                      	</td>
                    </tr>
                   <tr onmouseover="this.bgColor='#F5F5F5';" onmouseout="this.bgColor='ffffff';" bgcolor="ffffff">
                      <td class="left">广告链接</td>
                      <td><input type="text" name="linkurl" id="linkurl" value="<{$info['linkurl']}>" class="skey" style="width:150px;" ></td>
                    </tr>
					<tr onmouseover="this.bgColor='#F5F5F5';" onmouseout="this.bgColor='ffffff';" bgcolor="ffffff">
                      <td class="left">所在模板</td>
                      <td><input type="text" name="modulename" id="modulename" value="<{$info['module']|default:$sitetemp}>" class="skey" style="width:150px;" ></td>
                    </tr>

                    <input type="hidden" name="uid" id="uid" value="<{$info['id']}>" class="skey" style="width:150px;">

                  </tbody>
                </table>
              </div>
              <div class="blank20"></div>
               <input type="submit" value="确认提交" class="button">
            </form>
          </div>
        </div>
        <div class="blank20"></div>

      </div>
      </div>
      </div>
      </div>
      </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>


</div>

<!--newmain 结束-->
<script>
	var dialogs ;
 function uploads(){
 	  dialogs = art.dialog.open('<{ofunc type=url link="/adminpage/other/module/adminupload/func/uploadsucess/type/adv"}>');
 	  dialogs.title('上传图片');
 }
  function uploadsucess(flag,obj,linkurl){
 	 if(flag == true){
 		alert(linkurl);
		dialogs.close();
		uploads();
 	 }else{
 		 dialogs.close();
 	  $('#img').val(linkurl);
 	  $('#imgshow').attr('src',linkurl);
 	  $('#imgshow').show();
   }
 }


</script>
<{/block}>